module Aio::Ui

  require 'singleton'

  # 单例日志保存类
  class Logger

    include Singleton

    def initialize
      clear_log
    end

    def info=(msg)
      @log[:info] << msg
    end

    def debug=(msg)
      @log[:debug] << msg
    end

    def info
      @log[:info]
    end

    def debug
      @log[:info]
    end

    def clear_log
      @log = {}
      @log[:info] = []
      @log[:debug] = []
    end

  end
end

